Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shelf/elasticsearch-local

Package Overview
Dependencies
Maintainers
18
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shelf/elasticsearch-local

Run 6+ version of ElasticSearch locally

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
664
decreased by-15.2%
Maintainers
18
Weekly downloads
 
Created
Source

elasticsearch-local CircleCI npm (scoped)

Run any version of ElasticSearch locally

Usage

0. Install

$ yarn add @shelf/elasticsearch-local --dev

1. Start Elasticsearch

import {start} from '@shelf/elasticsearch-local';

await start({
  esVersion: '7.3.0',
  port: 9000, // optional
  clusterName: 'test', // optional
  nodeName: 'test', // optional
  indexes: [
    {
      name: 'your-index',
      // create index with options - https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-request-body
      body: {
        settings: {
          number_of_shards: '1',
          number_of_replicas: '1'
        },
        aliases: {
          'some-acc-id': {}
        },
        mappings: {
          "properties": {
            "field1" : {"type" : "text"}
        }
      }
    }
  ] // optional
});

2. Stop Elasticsearch

import {stop} from '@shelf/elasticsearch-local';

await stop();

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master

License

MIT © Shelf

Keywords

FAQs

Package last updated on 06 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc